<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!--<link rel="stylesheet" href="css">-->
    <script type="text/javascript" src="vue/vue.min.js"></script>
    <!--<script type="text/javascript" src="Js"></script>-->
</head>
<body>
<div id="outer">
<div :class="{'classname1':bool1, 'classname2':bool2}"
     :style="{'color':newColor, 'fontSize':newFontSize}">字典类名</div>
<div :class="object_class" :style="object_style">对象类名</div>
    <!--在style属性中列表和对象类似-->
    <!--列表显示字典值的类名-->
<div :class="[name1, name2]" :style="[object_style, object_style2]">列表类名</div>
<div :class="[bool1?'class1':'class2']"
     :style="object_style3">三目运算符类名
</div>
</div>
</body>
<script>
    var vm = new Vue({
        el:"#outer",
        data:{
            bool1:true,
            bool2:false,
            newColor:"red",
            newFontSize:"40px",
            object_class:{
                class3:true,
                class4:false
            },
            object_style:{
                color:"green",
                fontSize:"40px"
            },
            name1:"class5",
            name2:"class6",
            object_style2:{
                color:"blue",
                fontSize:"40px"
            },
            object_style3:{
                color:"orange",
                fontSize:"40px"
            },
        }
    })
</script>
</html>